<!doctype html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<title><?php if(isset($seo_title) && isset($site_title) && ($seo_title == $site_title)){?><?php echo isset($seo_title)?$seo_title:"";?><?php }else{?><?php echo isset($seo_title)?$seo_title:"";?>-<?php echo isset($site_title)?$site_title:"";?><?php }?></title>
	<link type="image/x-icon" href="<?php echo urldecode(Url::urlFormat("@favicon.ico"));?>" rel="icon">
	<link type="text/css" rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("#css/common.css"));?>" />
	<link type="text/css" rel="stylesheet" href="<?php echo urldecode(Url::urlFormat("#css/simple.css"));?>" />
	<?php echo JS::import('jquery');?>
	<script type='text/javascript' src="<?php echo urldecode(Url::urlFormat("#js/common.js"));?>"></script>
	<!--[if IE 6]>
		<script src="<?php echo urldecode(Url::urlFormat("#js/DD_belatedPNG-min.js"));?>"></script>
		<script>DD_belatedPNG.fix('.ie6png');</script>
	<![endif]-->
</head>
<body class="screen_960">
	<!--S 头部 -->
	<div id="header" class="clearfix">
		<div class="header-main" style="border-bottom:#7c0000 2px solid;">
			<div class="wrap">
				<div class="logo "><a href="<?php echo urldecode(Url::urlFormat("/index/index"));?>"><img class="ie6png" src="<?php echo urldecode(Url::urlFormat("@$site_logo"));?>" style="max-height:74px;"></a></div>
			</div>
		</div>
	</div>
	<!--E 头部 -->
	<!--S content-->
	<div id="content">
		<div class="wrap">
		<?php if(isset($msg)){?>
		<div class="message-box mt5" >
			<div class="message-head"><div class="message_<?php echo isset($msg[0])?$msg[0]:"";?> ie6png"><?php echo isset($msg[1])?$msg[1]:"";?></div><i class="fail "></i></div>
			<div class="message-content">
			</div>
		</div>
		<?php }?>
			<?php echo JS::import('dialog?skin=simple');?>
<?php if($order['type']==0){?>
<?php $items=array("购物车","确认订单信息","选择支付","订购完成");?>
<div id='widget_sub_navs'><?php $widget = Widget::createWidget('sub_navs');$widget->action = "crumbs";$widget->items = $items;$widget->step = "4";$widget->current = "3";$widget->cache = "false";$widget->run();?></div>
<?php }else{?>
<?php $items=array("确认订单信息","选择支付","订购完成");?>
<div id='widget_sub_navs'><?php $widget = Widget::createWidget('sub_navs');$widget->action = "crumbs";$widget->items = $items;$widget->step = "3";$widget->current = "2";$widget->cache = "false";$widget->run();?></div>
<?php }?>
<div class="box mt20">
<form action="<?php echo urldecode(Url::urlFormat("/payment/dopay"));?>" method="post" target="_blank">
<input type="hidden" name="order_id" value="<?php echo isset($order['id'])?$order['id']:"";?>">
<div class="mt20  clearfix tc">
	<img src="<?php echo urldecode(Url::urlFormat("#images/right.gif"));?>"><b class=" f18">订单已成功提交！</b>

</div>
<div class="mt10" style="padding:10px 100px;">
    <table class="default mt10 p10">
        <tr> <td style="width:200px;">订单编号：</td><td><i class="icon-order-<?php echo isset($order['type'])?$order['type']:"";?> ie6png"></i><?php echo isset($order['order_no'])?$order['order_no']:"";?> &nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo urldecode(Url::urlFormat("/ucenter/order_detail/id/$order[id]"));?>" target="_blank" class="red"> 查看订单>> </a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:tools_reload()" class=" btn btn-mini">刷新</a></td> </tr>
        <tr> <td style="width:200px;">订单金额：</td><td class="red"><?php echo isset($currency_symbol)?$currency_symbol:"";?><?php echo isset($order['order_amount'])?$order['order_amount']:"";?></td> </tr>
        <tr> <td style="width:200px;">支付方式：</td><td id="pay_name" class="bold"><?php echo isset($order['payment'])?$order['payment']:"";?></td> </tr>
    </table>
    <div class="mt10">
        <a href="javascript:;" id="voucher-btn" style="line-height: 25px;height:25px;font-weight:800"><i class="icon-plus"></i>其它支付方式：</a>
    </div>
    <table class="default mt20" id="payment-list" style="display:none;">
        <?php $item=null; $query = new Query("payment as pa");$query->fields = "pa.*,pp.class_name";$query->join = "left join pay_plugin as pp on pa.plugin_id = pp.id";$query->where = "pa.status = 0 and (pa.client_type = 0 or pa.client_type = 2)";$query->order = "pa.sort desc";$items = $query->find(); foreach($items as $key => $item){?>
        <tr><td width="200px;"><label><input type="radio" id="<?php echo isset($item['class_name'])?$item['class_name']:"";?>" name="payment_id" value="<?php echo isset($item['id'])?$item['id']:"";?>" <?php if($item['id']==$order['payment']){?>checked="checked"<?php }?> data-name="<?php echo isset($item['pay_name'])?$item['pay_name']:"";?>"> <?php echo isset($item['pay_name'])?$item['pay_name']:"";?> </label> <?php if($item['note']!=''){?><span class="fr"><a class="payment-note" href="#" note="<?php echo htmlspecialchars($item['note']);?>">详情</a></span><?php }?>
        </td></tr>
        <?php }?>
    </table>
    <div class="clearfix">
        <div id='widget_pay_bank'><?php $widget = Widget::createWidget('pay_bank');$widget->action = "bank";$widget->cache = "false";$widget->run();?></div>
        <?php $order_name = '订单号：'.$order['order_no'];?>
        <div id='widget_pay_weixin'><?php $widget = Widget::createWidget('pay_weixin');$widget->action = "weixin";$widget->order_no = $order['order_no'];$widget->order_amount = $order['order_amount'];$widget->order_name = $order_name;$widget->cache = "false";$widget->run();?></div>
    </div>
</div>
    
<div class="mt10 mb20 clearfix">
<p class="tc"><input class="btn" type="submit" value="立即支付"></p></div>
</form>
</div>

<script type="text/javascript">
    $("#voucher-btn").on("click",function(){
    $("#payment-list").toggle();
    if($("i",this).hasClass("icon-plus")){
        $("i",this).removeClass("icon-plus");
        $("i",this).addClass("icon-minus");
    }
    else{
        $("i",this).removeClass("icon-minus");
        $("i",this).addClass("icon-plus");
    }
});
    $("#payment-list input[type='radio']").each(function(){
        if(!!$(this).attr("checked")) $("#pay_name").text($(this).attr("data-name"));
        $(this).on("click",function(){
            $("#pay_name").text($(this).attr("data-name"));
        })
    });
    $(".payment-note").on("mouseenter",function(){
        if($(this).attr('note')!='')art.dialog({id:'payment-note',cancel:false,follow:this,content:$(this).attr('note')});
    })
    $(".payment-note").on("mouseleave ",function(){
        art.dialog({id:'payment-note'}).close();
    })
</script>
		</div>
	</div>
	<!--E content-->
	<!--S 底部 -->
	<div id="footer" class="mt20  ">
		<div class="wrap">
			<div class="copyright" style="border: 0">
				<div><?php $item=null; $query = new Query("nav");$query->where = "type = 'bottom'";$query->order = "`sort` desc";$items = $query->find(); foreach($items as $key => $item){?>
					<a href="<?php if(strstr($item['link'],'http://')===false){?><?php echo urldecode(Url::urlFormat("$item[link]"));?><?php }else{?><?php echo isset($item['link'])?$item['link']:"";?><?php }?>" target="<?php if($item['open_type']==1){?>_blank<?php }else{?>_self<?php }?>"><?php echo isset($item['name'])?$item['name']:"";?></a>
					<?php }?></div>
					<!--S 济南泰创软件科技有限公司保留所有版权，非授权用户严禁删除版权信息；擅自删除，后果自负，您的支持是我们成长的动力。-->
					<div><span>Powered by <a href="http://www.tinyrise.com"><b style="color: #7c0000">Tiny</b><b style="color: #666">Shop</b></a></span> © 2014 <a href="http://www.tinyrise.com">tinyrise.com</a> . 保留所有权利 。<?php echo isset($site_icp)?$site_icp:"";?> </div>
					<!--S 济南泰创软件科技有限公司保留所有版权，非授权用户严禁删除版权信息；擅自删除，后果自负，您的支持是我们成长的动力。-->
			</div>
		</div>

	</div>
	<!--E 底部 -->
</body>
</html>
<!--Powered by TinyRise-->